<template>
  <transition
    :name="transition"
    appear
    :appear-active-class="enterClass"
    :enter-class="enterClass"
    :leave-active-class="leaveClass"
    @beforeEnter="beforeEnter"
    @afterEnter="afterEnter"
    @beforeLeave="beforeLeave"
    @afterLeave="afterLeave"
  >
    <div class="modal-wrapper big-pic-modal" :class="customeClass" v-if="show">
      <div class="modal-mask" @click="staticDeactive"></div>
      <div
        class="modal-container"
        :style="{
					width: width && width.indexOf('%') > -1 ? width : width + 'px',
					minWidth: minWidth && minWidth.indexOf('%') > -1 ? minWidth : minWidth + 'px'
				}"
      >
        <slot name="modal-body">
          <div class="modal-body">
            <slot name="bigImgSlot">
              <img :src="picPath | setImgPath" alt />
            </slot>
          </div>
        </slot>
      </div>
    </div>
  </transition>
</template>
<script>
import basicModal from "@mixins/modal/basicModal.js";
export default {
  mixins: [basicModal],
  prop: {
    picPath: {
      type: String,
      required: true
    }
  },
  data() {
    return {
      // picPath: ''
    };
  }
};
</script>
<style lang="less">
@import "../../assets/less/base/variables.less";
@import "../../assets/less/mixins/border-radius.less";
.modalIn,
.modalOut {
  opacity: 0;
  .modal-mask {
    opacity: 0;
  }
  .modal-container {
    transform: scale(0.5);
  }
}
.modal-wrapper.big-pic-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	display: flex;
	justify-content: center;
	align-items: flex-start;
	padding-bottom: 8%;
	transition: all 0.2s ease;
	z-index: 1800;
	img {
		width: 100%;
		height: 100%;
	}
	.modal-container {
		background-color: @white;
		border-radius: @spacing / 2;
		z-index: 1850;
		transition: transform 0.3s ease;
		.modal-body {
			width: 600px;
			height: 500px;
		}
	}
}
.modal-mask {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
}
</style>
